# Test support for go mod edit -toolchain to set toolchain to use

env GOTOOLCHAIN=local
env GO111MODULE=on

! grep toolchain go.mod
go mod edit -toolchain=go1.9
grep 'toolchain go1.9' go.mod

go mod edit -toolchain=local
grep 'toolchain local' go.mod

go mod edit -toolchain=none
! grep toolchain go.mod

-- go.mod --
module m
go 1.8
